import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2022-09-25
 * Time: 22:39
 */
public class Main {
    public static void main(String[] args) {
        String str1=new String();
        String str2=new String();
        ArrayList<Character> list=new ArrayList<>();
        Scanner scanner=new Scanner(System.in);
        str1=scanner.nextLine();
        str2=scanner.nextLine();
        for (int i = 0; i < str1.length(); i++) {
            char ch=str1.charAt(i);
            if(!str2.contains(ch+"")){
                list.add(ch);
            }
        }

        for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i));
        }
    }

}